package team.seekers.hula.common.entity;

import lombok.*;

/**
 * @author GH
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class UserSessionDTO extends BaseDTO {

    public static final String HEADER_KEY = "Hula-Access-Token";
    public static final String HEADER_VALUE_LOGOUT = "logout";
    public static final String KEY_USERID_PREFIX = "HULAUserInfo-UserId";

    private String id;
    private String account;
    private String nickname;
    private String tel;
    private String role;
    private String ipv4;
    private String userAgent;


    public boolean userIdEquals(String userId) {
        return this.id != null && this.id.equals(userId);
    }

    public boolean userIdNotEquals(String userId) {
        return !userIdEquals(userId);
    }
}
